Method and system for altering defects in digital image

ABSTRACT

One aspect of the invention is a method for correcting a digital image representative of a tangible image. A first corrected intensity value for a first pixel of a first channel of the digital image is calculated using electronic circuitry in response to the intensity of a first defect pixel in a defect channel associated with the digital image. The original intensity value of the pixel is replaced with the first corrected intensity value. The intensity of the defect pixel is replaced with an intensity value signifying that the first pixel is reliable. A second corrected intensity value is then calculated for a second pixel of the first channel of the digital image in response to the intensity of the first pixel after replacement and the intensity of the first defect pixel after replacement.

RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application Ser.No. 60/160,500, filed Oct. 20, 1999 by Raymond Shaw Lee entitled,“Method and System for Altering Defects in a Digital Image”.

This application is related to U.S. application Ser. No. 08/999,421,filed on Dec. 29, 1997, by Albert Edgar and entitled, “Defect ChannelNulling.”

The application is related to U.S. Pat. No. 6,487,321 issued on Nov. 26,2002, by Albert Edgar, et al. and entitled, “Method and System forAltering Defects in a Digital Image.

TECHNICAL FIELD OF THE INVENTION

This invention relates generally to image processing and moreparticularly to a method and system for altering defects in a digitalimage.

BACKGROUND OF THE INVENTION

Tangible images, such as photographic images, may have surface defectssuch as scratches, fingerprints, or dust particles. Such defects mayoccur, in the case of photographic images, in a transparency or negativeas well as in a photographic print of a transparency or negative. Suchdefects often undesirably degrade a photographic image.

In the field of image processing, digital images derived fromphotographic images using a scanner most often include the defectspresent in the underlying photographic image. Because digital images aresubject to mathematical manipulation, if image defects may be identifiedand distinguished from image detail, then those defects can be removed,either partially or completely.

A defect channel comprising a digital signal proportional to the defectsin a photographic image may be created by scanning the photographicimage using an infrared light source and an infrared light sensor.Infrared light will tend to pass through developed photographic filmwith nearly complete transmission because the dye in various layers ofthe photographic film does not fully absorb infrared light. On the otherhand, where defects are present, a portion of the infrared light willtend to be refracted from the optical path before passing through thefilm. Thus, defects in the photographic image will tend to show up in adefect channel produced using an infrared light source and infraredsensor. In reflective scanners, a defect channel may be obtained byexamining the difference between images obtained when the image beingscanned is illuminated by light sources at different angles. Thechallenge is to use the defect channel to automatically alter defects ina digital image, while making as few undesirable changes to the digitalimage as possible.

SUMMARY OF THE INVENTION

One aspect of the invention is a method for correcting a digital imagerepresentative of a tangible image. A first corrected intensity valuefor a first pixel of a first channel of the digital image is calculatedusing electronic circuitry in response to the intensity of a firstdefect pixel in a defect channel associated with the digital image. Theoriginal intensity value of the pixel is replaced with the firstcorrected intensity value. The intensity of the defect pixel is replacedwith an intensity value signifying that the first pixel is reliable. Asecond corrected intensity value is then calculated for a second pixelof the first channel of the digital image in response to the intensityof the first pixel after replacement and the intensity of the firstdefect pixel after replacement.

The invention has several important technical advantages. Variousembodiments of the invention may have none, one, some, or all of theseadvantages without departing from the scope of the invention. Theinvention allows automatic alteration of defects in a digital imagebased upon a defect channel having a signal proportional to defects inthe digital image. The invention allows such defect correction to beperformed in place without creation of a separate output image. Thus,the invention may allow sophisticated defect correction techniques to beused with a significant reduction in the amount of memory used toperform the correction.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention and theadvantages thereof, reference is now made to the following descriptionstaken in conjunction with the accompanying drawings in which:

FIG. 1 illustrates a block diagram of a general purpose computer thatmay be used in accordance with the present invention;

FIG. 2 illustrates an example of a scanner that comprises an embodimentof the present invention;

FIG. 3 illustrates a flow chart describing the alteration of a defect ina digital image in accordance with one method of the present invention;

FIG. 4 illustrates a flow chart describing adjustment of an image inresponse to weighted averages produced by filtering an image inaccordance with the present invention;

FIG. 5 illustrates a flow chart describing a second method of alteringdefects in a digital image in accordance with the present invention;

FIG. 6 illustrates a graph of an example weighting function that may beused with the present invention; and

FIG. 7 illustrates a flow chart describing a method of altering defectsin a digital image using in-place correction in accordance with thepresent invention.

DETAILED DESCRIPTION OF THE INVENTION

The preferred embodiment of the present invention and its advantages arebest understood by referring to FIGS. 1-7 of the drawings, like numeralsbeing used for like and corresponding parts of the various drawings.

FIG. 1 illustrates a general purpose computer 10 that may be used forimage enhancement in accordance with the present invention.Specifically, general purpose computer 10 may comprise a portion of adigital image processing system and may be used to execute applicationscomprising image enhancement software. General purpose computer 10 maybe adapted to execute any of the well known MS-DOS, PC-DOS, OS2, UNIX,MAC-OS and Windows operating systems or other operating system. Generalpurpose computer 10 comprises processor 12, random access memory (RAM)14, read only memory (ROM) 16, mouse 18, keyboard 20, and input/outputdevices such as printer 24, disk drives 22, display 26 andcommunications link 28. The present invention includes programs that maybe stored in RAM 14, ROM 16, or disk drives 22 and may be executed byprocessor 12. Communications link 28 is connected to a computer networkbut could be connected to a telephone line, an antenna, a gateway, orany other type of communication link. Disk drive 22 may include avariety of types of storage media such as, for example, floppy diskdrives, hard disk drives, CD ROM drives, or magnetic tape drives.Although this embodiment employs a plurality of disk drives 22, a singledisk drive 22 could be used without departing from the scope of theinvention. FIG. 1 only provides one example of a computer that may beused with the invention. The invention could be used with computersother than general purpose computers as well as general purposecomputers without conventional operating systems.

General purpose computer 10 further comprises scanner 30 that may beused to scan images that are to be enhanced in accordance with theteachings of the invention. In this embodiment, enhancement may beperformed by software stored and executed by scanner 30 with the resultsstored in a storage medium comprising a part of scanner 30 and/or in anyof the storage devices of general purpose computer 10. Alternatively,software for image enhancement may be stored in any of the storage mediaassociated with general purpose computer 10 and may be executed byprocessor 12 to enhance images scanned by scanner 30. In addition, imageenhancement could occur both internally within scanner 30 and in generalpurpose computer 10 without departing from the scope of the invention.Scanner 30 may comprise a film scanner or a flatbed scanner of any typewithout departing from the scope of the invention. Image enhancement mayalso be performed using special purpose digital circuitry containedeither in scanner 30, general purpose computer 10, or in a separatedevice. Such dedicated digital circuitry which may include, for example,state machines, fuzzy logic, etc.

FIG. 2 illustrates an exemplary scanner 34 constructed in accordancewith the invention. Scanner 34 comprises processor 36, storage medium 38and scanning hardware 40. Processor 36 controls the operation ofscanning hardware 40 by executing control software 44 stored in storagemedium 38. Although a single storage medium has been illustrated forsimplicity, storage medium 38 may comprise multiple storage mediums aswell as comprising storage mediums of different types. Thus, forexample, control software 44 may be stored in ROM memory, RAM memory, oron a disk drive. Scanning hardware 40 is used to convert an analog imageinto a digital image utilizing some type of optical circuitry. Inaddition, optical circuitry may also be used to produce a defect channelproportional to defects in the analog image. Any type of opticalcircuitry could be used for scanning hardware 40 without departing fromthe scope of the invention. For the defect channel, a light sourcecomprised mostly of energy outside the visible spectrum and a matchingsensor may be used to create the defect channel. For example, aninfrared light source and sensor such as those typically used in imageprocessing applications involving photographic images may be used forthis aspect of the scanning hardware.

If scanner 34 comprises a reflective scanner, then a defect channel canbe derived from a plurality of scanned versions of the image in thevisible spectrum. Such a defect channel may be derived by illuminatingthe image being scanned at two or more angles and calculating changes inthe scanned image at the plurality of angles. Defects will tend toaffect the light differently when illumination is made from differentangles. Other types of scanning hardware may be used to create a defectchannel without departing from the scope of the invention.

After scanning hardware 40 has scanned an image, that image may beenhanced (by altering defects within it) in accordance with theinvention using image processing software 42, which is stored in storagemedium 38. Alternatively, rather than using software running on aprocessor (one type of digital circuitry), the invention may employother types of digital circuitry comprising any type of dedicateddigital hardware to alter defects in the digital image. This hardwaremay be a part of scanner 34 or general purpose computer 10 as discussedabove. Similarly, the scanned image may be stored in storage medium 38as may the enhanced image. Alternatively, scanner 34 may not have anyimage processing software 42. Such software instead may be provided ongeneral purpose computer 10 for enhancement of an image received fromscanner 34. Enhancement may occur both in scanner 34 and general purposecomputer 10 as well. Accordingly, a scanned image and/or an enhancedscanned image may be provided by scanner 34 to the general purposecomputer 10 through a communications port (not explicitly shown). Thedefect channel may be similarly provided. Although one embodiment of anexemplary scanner 34 that may be used for image enhancement inconnection with the invention has been illustrated, other scanners maybe used without departing from the scope of the invention.

FIG. 3 illustrates a flow chart describing a method employed by oneembodiment of the present invention to enhance a digital image. Theimage enhancement described herein may be carried out using computersoftware, as can any of the processes described below. That software, asdiscussed above, may be executed by scanner 34, by general purposecomputer 10, or a combination thereof. A digital image received fromother than scanner 30 may be enhanced in accordance with the invention.

The method described in FIG. 3 may be used to alter defects in manytypes of images such as color photographic images (either negative printor transparency), black and white images (either negative print ortransparency and including black and white images derived fromphotographic film with multiple layers), other monochromatic images,x-rays or any other type of image stored on film. The invention may alsobe used to alter defects in any image on a tangible medium that may bescanned using a scanner.

In step 50, an image is scanned to create a digital image and defectchannel. As noted, however, this step could be omitted and the inventioncarried out on a image that has been previously scanned and has a defectchannel associated with it. In the case of a color image, the digitalimage will typically be comprised of three channels: a red channel, agreen channel, and a blue channel. Each channel is comprised of a seriesof pixels with each pixel having an intensity value associated with itcorresponding to the intensity of the particular color of light at thatspatial location in the original image. Other types of color images canbe used without departing from the scope of the invention. In addition,it is within the scope of the invention to convert a color image into ablack and white image for alteration of defects in the image. Theenhanced image with the altered defects could then be converted backinto a color image. The methods of the invention could also be appliedto a single color channel of a digital image and the same correctioncould be applied to all channels of the digital image. A black and whiteimage may comprise one or more channels similarly made up of pixels.Other types of images may also comprise one or more similar channels.The invention can be used for any of these types of images.

The defect channel comprises a series of pixels, each having anintensity value either directly proportional or inversely proportionalto defects (or the lack thereof) in the original image. Such a defectchannel may be created, for example, using an infrared light source andinfrared sensor of the kind commonly used in image processingapplications involving photographic film. Other types of light sourcesand sensors may be used to create the defect channel, such as describedabove in connection with reflective scanners, for example. Any othermethod may be used to generate a suitable defect channel withoutdeparting from the scope of the invention. Such a defect channel willordinarily produce a signal having a stronger correlation to defects inthe original image and a weaker correlation to the visible image itself.

Steps 52-58 comprise a method for altering defects in a digital image toproduce an enhanced digital image. Before describing the process indetail, it may be helpful to describe it generally. To enhance a digitalimage by altering defects in the digital image, the invention correctsdefects in at least two frequency bands. The term “correction” or“correct” when used in this application, refers broadly to alteringdefects in a digital image. An image defect does not need to becompletely removed or completely corrected to fall within the scope ofthe invention. Accordingly, defect correction includes, but is notlimited to, reduction or other alteration of a defect in a digitalimage. The frequency bands for the image are created using one or morefilters which average pixels in the neighborhood of a pixel in questionwith each pixel weighted according to its expected reliability. Theexpected reliability is determined by the intensity value in the defectchannel of the pixel in question or the pixel in question plus a seriesof pixels in the neighborhood of the pixel in question. Pixels thatappear to be more reliable based upon the defect channel are weightedmore heavily than those with a low expected degree of reliability. Thedefect channel may be similarly divided into frequency bands.

The effect of each weighted averaging operation is to create a low passfiltered version of the original image. Where multiple averagingoperations are performed, multiple low pass filtered versions of theoriginal image are derived, most often with different bandwidths. Thesemultiple lowpass filtered versions, along with the original image may beused to derive a representation of the original image in multiplecontiguous frequency bands. By subtracting one low pass filtered versionfrom another, a bandpass representation for one band may be derivedwhere common frequencies are eliminated. A series of bands can becreated similarly, as further described below.

The filtered representations of the digital image may then be processedsuch that the original image is divided into a plurality of frequencybands which collectively make up all or substantially all frequenciespresent in the original image but overlap little, if at all. These bandsmay then be recombined to produce an image with defects removed.

The same filtering operation may optionally be performed on the defectchannel. Defects may then be further removed, frequency band byfrequency band, by subtracting the defect channel bands from the imagefrequency bands. An enhanced image is then constructed by combining thecorrected individual frequency bands back together again.

In step 52, data is optionally converted to log space for the defectchannel and for each channel of the digital image where defectcorrection is to be performed. The conversion of data to logarithmicspace may enable the remaining steps of the method to be performed moreeasily than if the conversion were not made. For example, several of theoperations described below involve additions and subtractions in logspace, but could involve division by zero in non-log space. Becausedivision by zero can lead to erroneous results, it may be moreconvenient to carry out the process of the invention in log space.However, the performance of mathematically equivalent functions outsideof log space could also be used in connection with the invention.

Although any type of logarithmic calculation can be used, one embodimentof the invention uses the conversion to log space described byFormula 1. $\begin{matrix}{{Y(x)} = \frac{{{Log}_{10}\left( {x + 1} \right)}{Log}_{10}4095}{{Log}_{10}4096}} & (1)\end{matrix}$

In Formula 1, “x” represents the intensity value of the pixel to beconverted to log space. Each such pixel in this embodiment comprises atwelve-bit intensity value. Other numbers of bits can be used withoutdeparting from the scope of the invention. Depending upon how theinvention is carried out, convenient conversions may be made to takeinto account the capabilities of digital hardware used to performcalculations in accordance with the invention.

If data is converted to log space, and the defect channel is suitable,then a first type of defect correction may be carried out by subtractingthe defect channel from each of the visible image channels. Such asubtraction may be a direct subtraction or a bounded subtraction,analogous to the bounded subtraction described below in connection withFIG. 5. This subtraction may also take into account red leakage andclear film values where the defect channel is derived using an infraredsource and sensor in a film scanner. Any method of taking into accountthese effects (which are described below) is within the scope of theinvention. Defect channels obtained using infrared light in filmscanners will often be suitable for this optional enhancement of theimage. Even in such a case, however, this step is optional. Analternative to this optional subtraction is to subtract the defectchannel from the image channel, frequency band by frequency band, afterenhancement by weighted filtering as described below. This alternativeis also optional and may be done where a suitable defect channel isavailable. The defect channel may be suitable where pixel intensityvalues in the defect channel are proportional, either directly orinversely, to defects and vary approximately linearly with the amount oflight blocked by the defect.

In step 54, the image and defect channel are filtered by taking weightedaverages of pixels within varying distances from specific pixels. Asnoted above, each channel of the image may be filtered, the channels maybe combined into a single channel and the combined channel filtered or asubset of the channels can be combined or filtered individually and thedefect correction applied based upon results obtained from thosechannels without departing from the scope of the invention. Dependingupon the type of enhancement used, the filtering of the defect channelis also optional.

The weighting applied to a specific pixel in calculating the weightedaverages may be based upon the expected reliability of that pixel. Theexpected reliability of a pixel may be determined by using the defectchannel. As used herein, “a weighted average” or “averaging” or anysimilar term refers to any type of average such as a median average,mode average, mean average, arithmetic average, or geometric average.The calculation of weighted averages of pixels around the pixels in eachchannel of the digital image has the effect of filtering each channelwith different strengths of low pass filters. The effect of weightingeach pixel (or a subset of the pixels) involved in the calculation ofthe averages based upon the expected reliability of each pixel dampensthe effect of the defect in each filtered version of the originalchannel of the digital image.

An example may illustrate the calculation of the weighted averages. Inthis example, four filtering operations are performed: a 3×3 weightedaverage, a 5×5 weighted average, a 9×9 weighted average, and a 17×17weighted average. In this example, each of these four weighted averagesis computed for each pixel in each pixel in the digital image. Any pixeloutside the boundaries of the image is set to zero for purposes of thesecalculations. For a particular pixel, the 3×3 weighted average iscomputed using a 3×3 matrix of pixels with the pixel in question at thecenter of the matrix. Thus, pixels in the neighborhood of the pixel inquestion are used to calculate the weighted average. The weight appliedto each pixel corresponds to its expected reliability as determinedusing a corresponding pixel or pixels in the defect channel. Theweighted average is computed by summing the product of the intensity ofeach pixel times the weight and dividing the total sum by the sum of theweight values that were applied to each pixel. The 5×5, 9×9, and 17×17filters are calculated similarly.

The calculation of the four discussed weighted averages at each pixelresults in four low pass filtered versions of the original channel ofthe digital image. The 3×3 weighted average applied to each pixel of theimage channel produces a low pass filtered version of the image havingspatial frequencies between essentially zero and one-third of themaximum spatial frequency possible in the image. Similarly, the 5×5weighted average produces a low pass filtered version of the originalchannel of the digital image having frequencies predominantly betweenzero and one-fifth of the maximum spatial frequency possible in theimage. The 9×9 and 17×17 weighted averages produce filtered versionswith frequencies predominantly between zero and one-ninth the maximumspatial frequency possible in the image and predominantly between zeroand one-seventeenth the maximum spatial frequency possible in the image.Due to the weighting applied to each pixel during this filteringoperation, the filtered versions in each frequency band have had theeffects of defects reduced. Low pass filtering alone tends to dampen theeffects of defects, but may also blur image detail. The weighting maydampen the effects of a defect more than low pass filtering alone wouldwith proportionally less reduction of image detail. This example will beused below to further illustrate adjustment of the image and defectchannel. The same filtering operation may also be performed on thedefect channel, if desirable for use in further reduction of defects.

Numerous options may be used for calculating the weighted average of apixel and other pixels in the neighborhood of the pixel. The filter canhave a square shape (as in the example above), a circle shape, or anyother type of shape without departing from the scope of the invention.The filter may be symmetric or asymmetric and may be centered or notcentered on the pixel in question. The filter may also be a window withfeathered edges. In addition, any number of filters can be used. The useof more filters will allow division of the image into a greater numberof frequency bands. The use of additional filters, however, requiresadditional calculation. Less filters than those used in the aboveexample can also be used without departing from the scope of theinvention.

The filters in the example above had particular dimensions each of whichare approximately double the dimensions of the previous filter. Any sizefilters can be used, however, without departing from the scope of theinvention. In the example above, any pixel outside the boundaries of theimage was set to an intensity value of zero for purposes of the weightedaverage calculation. Other boundary conditions could be used withoutdeparting from the scope of the invention; for example, soft edgeboundary conditions such as a triangle edge or gaussian edge could beused.

In the example above, the weighted average was computed for each pixelin each channel of the digital image and in the defect channel. Theweighted average could also be performed on a subset of the pixels in achannel or on all of the pixels in a subset of the channels withoutdeparting from the scope of the invention. In addition, differentweights could be used for each frequency band and could be omitted insome frequency bands. Different weights could also be used for differentchannels.

The weighting used for a particular pixel can be determined in severalways. The weighting could depend upon the intensity of a spatiallycorresponding pixel in the defect channel. Where the weighting isapplied to the defect itself, the weighting could be determined basedupon the intensity of each pixel involved in the calculation. The sameor different weightings could be used for the defect channel and one ormore image channels. The defect channel, however, may be blurredcompared to the visible channel due to focal shifts, the nature of thedefects, and inconsistent registration between the visible channels ofthe digital image and the defect channel, for example. Accordingly, itmay be desirable to estimate the reliability of a pixel and determineits weight by taking into consideration a plurality of pixelssurrounding a pixel in the defect channel corresponding to the pixel ina visible image channel that is the subject of the weighted averagecalculation. Alternatively, if blurring effects are insignificant andregistration error is fairly constant, then the pixel used in the defectchannel could be chosen while compensating for the constant registrationerror.

The particular weighting function chosen may depend upon thecharacteristics of the particular scanner used to create the defectchannel. The weighting applied may be a function of the intensity valueof a pixel or pixels in the defect channel. Where multiple pixels areused to determine a weight, an average or weighted average of the pixelsmay be used to come up with an average intensity used to determine aweight.

Any type of function may used to relate a weight to the intensity of apixel in the defect channel or average intensity of a series of pixelsin the defect channel. A straight line may be used to establish thisfunction or any other type of curve may be used. In this example, a highthreshold and a low threshold may be determined based upon thecharacteristics of an infrared channel produced by a scanner. Forexample, in one embodiment, a weight of one may be assigned for allpixel values greater than a particular high threshold where thethreshold provides high predictability that no defect is present. Aweight of zero may be assigned when the intensity value is below acertain low threshold indicating a high probability that a defect ispresent with little or no image detail remaining. For points with anintensity in between these threshold values, a straight line or othercurve can be used to connect the two thresholds to establish acontinuous function for weights between zero and one. Pixels withintensity in this middle region tend to be ones that are defective butsome image detail remains to allow enhancement of the digital image toremove the defect but maintain some image detail. In the case of adefect channel derived from a reflective scanner using illumination frommultiple angles, the intensity of the pixels in the defect channel maylack a linear relationship to the amount of light that passes through adefect. With such a defect channel, a discrete set of weights such as 0,1/2 and 1, may be used.

An example of a weight function is illustrated in FIG. 6. In FIG. 6,infrared intensity in the defect channel will be high when no defect ispresent as most or all of the infrared energy is allowed to pass throughthe film. Where a defect is present, however, infrared intensity will below. In this example, all likely defective pixels (those with aninfrared intensity in the defect channel less than 20 percent) are setto a weight of zero. All pixels with a high probability of beingnon-defective pixels (those with an infrared intensity in the defectchannel greater than 64 percent of the maximum intensity are assigned aweight of one). Pixels in the region in between are assigned a weightbased upon the illustrated curve. Again, more complicated functions maybe used without departing from the scope of the invention.

The weighting applied may also compensate for effects such as leakagefrom the red channel of a color image into the defect channel. Thisleakage may result because infrared light sources and/or sensors areresidually sensitive to the cyan dye in an image used to modulate thered region of the visible spectrum. This effect manifests itself as anapparent leakage of the red image into the infrared image. The effectsof red leakage can be taken into account when establishing a weightvalue. For example, an overall red leakage value for an image may becalculated. This red leakage value can then be used to establish aconstant to be multiplied times a pixel intensity value in the redchannel. This product may represent an estimate of the amount of the redchannel present in the defect channel for that particular pixel. Thus,in calculating a weight, this product may be subtracted from theintensity of the pixel in the defect channel.

Similarly, a portion of the intensity in the defect channel isproportional to the intensity that would result if infrared light waspassed through clear film. Different types of film produce differentintensity values when infrared is passed through the clear film.Accordingly, the weight may also be adjusted by subtracting the averageclear film value for a particular digital image.

Depending upon the type of filtering employed, one could filter theimage once with one or more filters and then filter the corrected imageagain with different filters. A decision could be made as to whether toapply the second filtering step based upon the estimated size of defectsas determined by the defect channel.

In Step 56, the channels of the digital image and the defect channel areadjusted in response to the weighted averages to lessen the effects ofdefects in the image. The invention includes any use of the weightedaverages computed in Step 54 to adjust an image to lessen the effects ofdefects in the image. A specific method for adjusting the digital imagein response to the weighted averages will be discussed below inconnection with FIG. 4. Such adjustment could occur in the time domainor the frequency domain and, when in the spatial domain, in log space orany other space. After the image has been adjusted to lessen the effectsof defects, the process terminates in Step 58.

Besides the method described below in connection with FIG. 4, anotherpossible method of enhancement is to create a series of essentiallycontiguous frequency bands based upon the plurality of weighted averagesof the original image and the original image itself. The process ofcreating these bands may be as described below in connection with step60 of FIG. 4. After these bands have been created, they may be addedtogether to form an enhanced version of the original image with thedefects reduced. This method may be used, for example, where the defectchannel is unsuitable for subtraction from the image. This method could,however, be used even where a defect channel is suitable for correction.The enhanced image may also be further enhanced by other operationswithout departing from the scope of the invention. If the pixel data wasconverted to log space in step 52, the enhanced pixel data may beconverted back to the space of the original image using a suitableinverse formula such as an inverse to Formula 1.

FIG. 4 illustrates one example of a method for adjusting images inresponse to weighted averages to lessen the effects of defects in thedigital image. In step 60, the filtered digital image (which comprisesthe original digital image and the filtered versions of the digitalimage calculated in Step 54) and the filtered defect channel (whichconsists of the original defect channel and the filtered versions of thedefect channel obtained in step 54) are separated into frequency bandsin response to the calculated weighted averages. In general, thefiltered images and the original image are used to create a series offrequency bands with little or no overlap representative of the originaldigital image and original defect channel with defective pixelssuppressed due to the weighting that took place during the filteringoperation. This method assumes that the defect channel was filtered inFIG. 3.

Using the example discussed above in connection with FIG. 3, fivefrequency bands may be created using the four weighted averagescalculated. For purposes of the following, F_(m) represents the maximumspatial frequency that can exist in the digital image. For a particularchannel of the digital image or for the defect channel, the fivefrequency bands corresponding to the channel in question may be createdusing the weighted averages computed for that channel. The frequencyband from approximately 1/3 F_(m) to F_(m) comprises the differencebetween the original channel and the 3×3 weighted average filteredversion of that channel. The frequency band from approximately 1/5 F_(m)through 1/3 F_(m) may be calculated by subtracting the 5×5 weightedaverage version of the channel from the 3×3 weighted average version ofthe original channel. The frequency bands from approximately 1/5 F_(m)to 1/9 F_(m) and approximately 1/17 F_(m) to 1/9 F_(m) may be determinedby subtracting the 9×9 weighted average version of the original channelfrom the 5×5 version of the original image channel and by subtractingthe 17×17 weighted average version of the original channel from the 9×9weighted average version of the original channel, respectively. Finally,the frequency band from approximately zero to 1/17 F_(m) is representedby the 17×17 weighted average version of the original image channel.

In general, the low pass filtered versions of the image and defectchannel created using the weighted averages can be used to divide eachchannel of the image as well as the defect channel into contiguousfrequency bands where some or all of the frequency bands have had theeffect of defects suppressed using the weighted average calculations.

In Step 62, the red residue in each frequency band of the defect channelmay be removed. Optionally, such residue may be removed using a boundedcalculation to allow some variance. If infrared sources and sensors (orother sources and sensors) are used that do not leave red residue in thedefect channel, then the step may be omitted without departing from thescope of the invention. One option for removing the red leakage from thedefect channel is to subtract from the intensity value of each pixel inthe defect channel, the product of the intensity of the correspondingpixel in the red channel multiplied by an average red leakage constantrepresenting the average red leakage for the entire digital image. Thisdifference may be divided by the difference between one and the redleakage value to properly normalize the result. Alternatively, becausered leakage may vary within regions of particular images, it may beuseful to use a bounded subtraction to allow for some variance inlocalized red leakage values.

An example of a bounded subtraction for red residue will be provided inconnection with FIG. 5 below. In general, two or more subtractions areperformed from the intensity value in the defect channel. The product ofthe intensity value for the pixel in question in the red channel ismultiplied by the red leakage constant adjusted upward for onesubtraction and adjusted downward for a second subtraction from theintensity value in the defect channel. These results are divided by thedifference between one and the appropriate adjusted red leakageconstant. If both calculations have results having the same sign (i.e.,both are positive or both are negative) then the smaller result ischosen. If the results have opposite signs, then the pixel in questionis set to zero. Besides allowing variance in the red leakage value, sucha bounded subtraction may compensate for registration error betweenvisible channels of the digital image and the defect channel as well asfor blurring that may occur in the defect channel.

In Step 64, defects are further removed from the image by subtractingthe relevant frequency band of the defect channel obtained in Step 62from the relevant frequency band in each image channel obtained in Step60. Optionally, a bounded calculation such as that described inconnection with Step 62 may be used to allow for some variance caused byregistration error, blurring, etc. in the defect channel.

Next, in Step 66, the frequency bands are recombined through a summationto form an enhanced image with the original defect removed. In Step 67,the enhanced image is converted back from log space to the originalspace from which it was derived using a suitable inverse formula such asan inverse to Formula 1. If the enhanced image was created in a spaceother than log space, then Step 67 may be omitted without departing fromthe scope of the invention. If Step 60 through 66 were carried out inthe frequency domain, then the enhanced image may be reconverted back tothe time domain in Step 67.

FIG. 5 illustrates a flow chart describing a second method of enhancingan image by altering defects in the image in accordance with theinvention. In this embodiment, an image may be divided into segments anddefects processed within each individual segment. By dividing the imageinto segments, the amount of storage space used at any one time toenhance the image may be reduced, and the amount of computation requiredmay be reduced. Thus, in this embodiment, the image is divided intosegments and a process similar to that discussed above in connectionwith FIGS. 3 and 4 is applied to each segment individually as if thatsegment comprised the entire image.

In step 68 an image is scanned to create a digital image comprising oneor more channels and a defect channel. All of the options discussedabove in connection with step 50 are available for this embodiment ofthe invention. Next, in step 70 the data from the defect channel and thechannels of the digital image is converted to log space. Again, any ofthe options discussed above in connection with step 52 may be employedin step 70, including optional subtraction of the defect channel fromthe visible channel.

In step 72, each channel of the digital image and the defect channel maybe divided into segments. Any size or shape of segments may be usedwithout departing from the scope of the invention. In one embodiment,each channel of the digital image and the defect channel are dividedinto 8×8 segments. This example will be used to illustrate the remainderof the steps of the method illustrated in FIG. 5.

In step 74, weighted averages of pixels within varying distances fromspecific pixels in a segment of the defect channel and a segment of eachchannel of the image are computed. These weighted averages are computedsimilarly to the weighted averages that were computed in step 54.However, the weighted averages computed in step 74 are computed for anindividual segment of the image, assuming that the segment comprises theentire image. Accordingly, even if the 8×8 segment is surrounded byother 8×8 segments, the pixels beyond the boundaries of 8×8 segment inquestion are treated as beyond the image boundary and any pixel beyondthose boundaries are treated as having an intensity of zero (or otherboundary condition).

All of the options for filtering and weighting discussed above inconnection with step 54 may be employed in step 74 for the embodimentdisclosed in FIG. 5 (including the option of not filtering the defectchannel) . However, because the segment in this example is 8×8, an 8×8filter is the maximum sized filter that will be used in this example.The weight function, in this embodiment, takes into account red leakageand clear film effects as discussed above in connection with step 54.The weight for a particular pixel for the weighted average calculationsmay be determined, for example, using Formula 2.

W(x,y)=2(D _(in)(x,y)−R _(L) R _(in)(x,y)−C _(F))+1.4  (2)

Limit 0≦W(x,y)≦1

In Formula 2, x and y represent the coordinates of a particular pixelwithin an 8×8 segment. D_(in) represents the defect channel receivedfrom the scanner in step 68. R_(L) comprises a constant valuerepresentative of average red leakage in either the segment in questionor in the entire digital image. R_(IN) represents the red channel of thedigital image. C_(F) is a constant representing the average clear filmvalue for either the segment in question or the entire digital image.The weight function of Formula 2 is constrained such that the weightvaries between zero and one. A plot of the weighting function versus theintensity in the defect channel would look similar to the curveillustrated in FIG. 6. Any other weight function could be used withoutdeparting from the scope of the invention.

In this example, two different weighted averages are computed for eachchannel. A 3×3 weighted average is computed. In addition, an 8×8weighted average is computed. The 8×8 average covers the entire segment,and as a result, a single scalar value may be used to represent theresult of this weighted average. The 3×3 weighted average for the red,green, blue, and defect channels may be computed using Formulas 3through 6. $\begin{matrix}\begin{matrix}{{R_{3L}\left( {x,y} \right)} = \frac{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{{W\left( {{x + a},{y + b}} \right)}{R_{in}\left( {{x + a},{y + b}} \right)}}}}{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} \neq 0} \\{{R_{3L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} = 0}\end{matrix} & (3) \\\begin{matrix}{{G_{3L}\left( {x,y} \right)} = \frac{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{{W\left( {{x + a},{y + b}} \right)}{G_{in}\left( {{x + a},{y + b}} \right)}}}}{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} \neq 0} \\{{G_{3L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} = 0}\end{matrix} & (4) \\\begin{matrix}{{B_{3L}\left( {x,y} \right)} = \frac{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{{W\left( {{x + a},{y + b}} \right)}{B_{in}\left( {{x + a},{y + b}} \right)}}}}{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} \neq 0} \\{{B_{3L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} = 0}\end{matrix} & (5) \\\begin{matrix}{{D_{3L}\left( {x,y} \right)} = \frac{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{{W\left( {{x + a},{y + b}} \right)}{D_{in}\left( {{x + a},{y + b}} \right)}}}}{\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} \neq 0} \\{{D_{3L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = {- 1}}^{1}{\sum\limits_{b = {- 1}}^{1}{W\left( {{x + a},{y + b}} \right)}}}} = 0}\end{matrix} & (6)\end{matrix}$

In these Formulas, R_(in), G_(in), B_(in), D_(in), respectively,represent the red, green, blue, and defect channels of the digital imagethat was scanned in step 68.

The 8×8 weighted average for the red, green, blue, and defect channelsmay be calculated using Formulas 7 through 10, respectively. As noted,each of these Formulas produces a scalar result. $\begin{matrix}\begin{matrix}{{R_{8L}\left( {x,y} \right)} = \frac{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{{W\left( {a,b} \right)}{R_{in}\left( {a,b} \right)}}}}{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} & {{{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} \neq 0}\quad} \\{{R_{8L}\left( {x,y} \right)} = 0} & {{{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} = 0}\quad}\end{matrix} & (7) \\\begin{matrix}{{G_{8L}\left( {x,y} \right)} = \frac{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{{W\left( {a,b} \right)}{G_{in}\left( {a,b} \right)}}}}{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} & {{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} \neq 0} \\{{G_{8L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} = 0}\end{matrix} & (8) \\\begin{matrix}{{B_{8L}\left( {x,y} \right)} = \frac{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{{W\left( {a,b} \right)}{B_{in}\left( {a,b} \right)}}}}{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} & {{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} \neq 0} \\{{B_{8L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} = 0}\end{matrix} & (9) \\\begin{matrix}{{D_{8L}\left( {x,y} \right)} = \frac{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{{W\left( {a,b} \right)}{D_{in}\left( {a,b} \right)}}}}{\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} & {{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} \neq 0} \\{{D_{8L}\left( {x,y} \right)} = 0} & {{{where}\quad {\sum\limits_{a = 0}^{7}\quad {\sum\limits_{b = 0}^{7}{W\left( {a,b} \right)}}}} = 0}\end{matrix} & (10)\end{matrix}$

R_(3L) represents a weighted low-pass filtered version of the redchannel of the digital image having a frequency band betweenapproximately zero and 1/3 F_(m), where F_(m) is the maximum spatialfrequency possible for the segment of the digital image. G_(3L), B_(3L),and D_(3L) cover a similar frequency band for the green, blue, anddefect channels respectively. R_(8L) represents a weighted low-passfiltered version of the red channel of the digital image having afrequency band between approximately zero and 1/8 F_(m). G_(8L), B_(8L),and D_(8L) represent weighted low-pass filtered versions of the green,blue, and defect channels, respectively in the same frequency band.

In step 76, the segment of the image is adjusted to lessen the effectsof defects in the image in response to the weighted averages of eachimage channel and the defect channel obtained in step 74 and theoriginal image channels and defect channels. Any of the optionsdiscussed above in connection with step 56 and steps 60 through 67 maybe used in connection such adjustment.

In this example, a version of the original image and original defectchannel, with effects of the defect partially suppressed due theweighted averages computed in step 74, is created in three separatefrequency bands. For each image channel and the defect channel, a firstfrequency band is obtained having frequencies between approximately zeroand 1/8 F_(m). A second frequency band extends from approximately 1/8F_(m) to 1/3 F_(m). A third frequency band extends from approximately1/3 F_(m) to F_(m).

The first frequency band may be obtained using Formulas 11 through 14.

 R _(8B) =R _(8L)  (11)

G _(8B) =G _(8L)  (12)

B _(8B) =B _(8L)  (13)

D _(8B) =D _(8L)  (14)

Because this frequency band was already calculated in step 74, it can beused without any further computation.

The third frequency may be computed using Formulas 15 through 18. Inthese Formulas, the weighted low-pass filtered version of each channelin the frequency range of approximately zero to 1/3 F_(m) is subtractedfrom the unfiltered image channel to produce the frequency band betweenapproximately 1/3 F_(m) and F_(m).

R _(1B)(x,y)=R _(in)(x,y)−R _(3L)(x,y)  (15)

G _(1B)(x,y)=G _(in)(x,y)−G _(3L)(x,y)  (16)

B _(1B)(x,y)=B _(in)(x,y)−B _(3L)(x,y)  (17)

D _(1B)(x,y)=D _(in)(x,y)−D _(3L)(x,y)  (18)

Finally, the second frequency band, the one between approximately 1/8F_(m) and 1/3 F_(m) may be computed using Formulas 19 through 22. InFormulas 19 through 22, the 8×8 weighted filtered version of each imagechannel is subtracted from the 3×3 weighted filtered version of theoriginal image channel. The process just described for creating aplurality of frequency bands may employ any of the options discussedabove in connection with step 60.

R _(3B)(x,y)=R _(3L)(x,y)−R _(8L)(19)

G _(3B)(x,y)=G _(3L)(x,y)−G _(8L)(20)

B _(3B)(x,y)=B _(3L)(x,y)−B _(8L)(21)

D _(3B)(x,y)=D _(3L)(x,y)−D _(8L)(22)

Next, the red residue may be removed from the defect channel in eachfrequency band. Again, any of the options described above in connectionwith step 62 may be used without departing from the scope of theinvention. In this embodiment, a bounded subtraction is used for two ofthe frequency band and a simple subtraction is used for the remainingfrequency band. Formula 23 may be used to subtract the red residue inthe first frequency band of the defect channel. $\begin{matrix}{D_{8B}^{\prime} = \frac{D_{8B} - {R_{8B}D_{K8}R_{L}}}{1 - {D_{K8}R_{L}}}} & (23)\end{matrix}$

In Formula 23, the constant, D_(K8), will normally be set to one, butmay vary depending upon the scanner in question. This constantrepresents the amount of the red channel that should be subtracted fromthe defect relative to the measured average red leakage for the entiresegment and/or the entire image.

Formulas 24 through 26 may be used to subtract the red residue from thesecond frequency band of the defect channel. $\begin{matrix}{{{T1}_{D3B}\left( {x,y} \right)} = \frac{{D_{3B}\left( {x,y} \right)} - {{R_{3B}\left( {x,y} \right)}D_{K3H}R_{L}}}{1 - {D_{K3H}R_{L}}}} & (24) \\{{{T2}_{D3B}\left( {x,y} \right)} = \frac{{D_{3B}\left( {x,y} \right)} - {{R_{3B}\left( {x,y} \right)}D_{K3L}R_{L}}}{1 - {D_{K3L}R_{L}}}} & (25)\end{matrix}$

 D′ _(3B)(x,y)=T 1 _(D3B)(x,y) where |T 1 _(D3B)(x,y)|≦|T 2 _(D3B)(x,y)|

and T1 _(D3B)(x,y) and T2 _(D3B)(x,y) have the same sign

D′ _(3B)(x,y)=T 2 _(D3B)(x,y) where |T 2 _(D3B)(x,y)|<|T 1_(D3B)(x,y)|  (26)

and T1 _(D3B)(x,y) and T2 _(D3B)(x,y) have the same sign

D′ _(3B)(x,y)=0

where T1 _(D3B)(x,y) and T2 _(D3B) (x,y) have different signs

The bounded subtraction provided for in Formulas 24 through 26 allowsfor local variance in the red leakage value, as well as for someregistration error and/or blurring in the defect channel as compared tothe visible channel. Formula 24 multiplies a high value constant,D_(K3H) against the red leakage constant, R_(L). Formula 25 multiplies alow-value constant, D_(K3L), by the red leakage constant, R_(L). D_(K3H)and D_(K3L) are the high and low ranges determining how much of theimage content in the red channel should be subtracted from the defectchannel. These constants may be determined experimentally.

In this embodiment, D_(K3H) is chosen to be 1.3 while D_(K3L) is chosento be 0.6. These constants will tend to average about one. The averageis a function of the resolution of the system for the infrared channelversus the red channel. The spread between these two constants is afunction of the accuracy of the scanner that produces the defectchannel. If D_(K3H) is chosen too large, then small image patterns maycause large matching defects to be erased, rendering defects uncorrectedin middle frequencies when they are next to image detail. If D_(K3H) ischosen too small, then image residue may remain in the defect record,causing middle frequency image detail to be erased. If D_(K3L) is chosentoo large, then too much image detail may be removed from the defectcausing a negative residue that interferes with the ability todistinguish a defect. If D_(K3L) is chosen too small, then visibledetail may not be removed in the presence of defect detail of oppositepolarity.

After the results of Formula 24 and 25 are calculated, the revisedversion of the frequency band is calculated using Formula 26. If theresults of Formula 24 and Formula 25 have different signs, then theintensity value is set to zero. If these signs are the same, then thelesser value produced by either Formula 24 or Formula 25 is chosen.Thus, this bounded subtraction tends to drive the revised value closerto zero.

Formulas 27 through 32 may be used to remove red residue in the defectchannel for the third frequency band created above. $\begin{matrix}{{{T1}_{D1B}\left( {x,y} \right)} = \frac{{D_{1B}\left( {x,y} \right)} - {{R_{1B}\left( {x,y} \right)}D_{K1H}R_{L}}}{1 - {D_{K1H}R_{L}}}} & (27) \\{{{T2}_{D1B}\left( {x,y} \right)} = \frac{{D_{1B}\left( {x,y} \right)} - {{R_{1B}\left( {x,y} \right)}D_{K1L}R_{L}}}{1 - {D_{K1L}R_{L}}}} & (28)\end{matrix}$

 T 3 _(D1B)(x,y)=T 1 _(D1B)(x,y) where |T 1 _(D1B)(x,y)|≦|T 2_(D1B)(x,y)|

and T1 _(D1B)(x,y) and T2 _(D1B)(x,y) have the same sign

T 3 _(D1B)(x,y)=T 2 _(D1B)(x,y) where |T 2 _(D1B)(x,y)|<|T 1_(D1B)(x,y)|  (29)

and T2 _(D1B)(x,y) and T1 _(D1B)(x,y) have the same sign

T 3 _(D1B)(x,y)=0

where T1 _(D1B)(x,y) and T2 _(D1B)(x,y) have different signs

T 4 _(D1B)(x,y)=T 3 _(D1B)(x,y)−D_(K1A)  (30)

T 5 _(D1B)(x,y)=T 3 _(D1B)(x,y)−D_(K1A)  (31)

D′ _(1B)(x,y)=T 4 _(D1B)(x,y) where |T 4 _(D1B)(x,y)|≦|T 5 _(D1B)(x,y)|

and T4 _(D1B)(x,y) and T5 _(D1B)(x,y) have the same sign

D′ _(1B)(x,y)=T 5 _(D1B)(x,y) where |T 5 _(D1B)(x,y)|<|T 4_(D1B)(x,y)|  (32)

and T5 _(D1B)(x,y) and T4 _(D1B)(x,y) have the same sign

D′ _(1B)(x,y)=0

where T5 _(D1B)(x,y) and T4 _(D1B)(x,y) have opposite signs

Formulas 27 through 29 are similar to Formulas 24 through 26. For thisfrequency band, in this example, the high-constant D_(K1H) is chosen tobe 1.0 while the low-frequency constant, D_(K1L) is chosen to be 0.3.Similar considerations apply to the choice of these constants, asapplied to the choice of D_(K3H) and D_(K3L) above. In this case, theeffects of these constants will be in the high frequency band. Here, theaverage of the two constants is less than one and may be chosen as suchto the extent that heightened frequency defects are blurred relative tothe high frequency image. The range is also wider to accommodate agreater variance that often occurs at higher frequencies.

The difference between Formulas 27 through 32 and Formulas 23 through 26involves the addition of Formulas 30 through 31. These Formulas make aminor adjustment in the value computed by Formula 29 to adjust forresidual noise in the high-frequency portion of the defect channel. Inthis embodiment, constant D_(K1A) has a value of 0.01. If the residualnoise constant, D_(K1A) is set too high, then detail in small defects inthe image may not be removed. If the value is set too low, then toolittle residual electronic noise will be removed from this frequencyband of the defect channel and such noise in the defect channel mayappear in the visible channel(s) as a negative of this noise, causingthe electronic noise in the defect channel to contaminate the processedvisible image.

Next, the defect is removed from the visible image frequency band byfrequency band. Similar bounded subtractions are performed as wereperformed when the red residue was removed from the defect channelabove. In this case, the constant for the first frequency band, R_(K8),is set to one, but could be adjusted. For this frequency band, a directsubtraction is used, rather than a bounded subtraction. Blurring effectstend not to affect this frequency band or affect it insignificantly, buta bounded subtraction could be employed if desired. The constantsR_(K3H) and R_(K3L) are set to 1.5 and 0.5 respectively. The constantsR_(K1H) and R_(K1L) are set to 1.7 and 0.5, respectively. These valuesare also chosen for the corresponding constants for the green and bluechannels. These constants establish the bounds within which correctionis made. Again, one selects whichever number between the bounds drivesthe corrected result closet to zero. The upper and lower bounds willnormally average about one, except that one may set the lower bound abit lower without damaging the image. Finally, the defects in theoriginal image may be suppressed even further by multiplying the pixelsresulting from a bounded subtraction of the defect channel from theimage channel by the weight for a particular pixel calculated usingFormula 2.

The defects may be removed from each frequency band of the visible imagechannels, using Formulas 33 through 59. Formulas 33 through 35 may beused to remove defect information from the first frequency band.Formulas 36 through 47 may be used to remove the defect from the middlefrequency band of each channel. Formulas 48 through 59 may be used toremove the defect from the third frequency band of each channel.

R′ _(8B) =R _(8B) −D′ _(8B) R _(K8)  (33)

G′ _(8B) =G _(8B) −D′ _(8B) G _(K8)  (34)

B′ _(8B) =B _(8B) −D′ _(8B) B _(K8)  (35)

T 1 _(R3B)(x,y)=R _(3B)(x,y)−D′ _(3B)(x,y)R _(K3H)  (36)

T 2 _(R3B)(x,y)=R _(3B)(x,y)−D′ _(3B)(x,y)R _(K3H)  (37)

 T 3 _(R3B)(x,y)=T 1 _(R3B)(x,y) where |T 1 _(R3B)(x,y)|≦|T 2_(R3B)(x,y)|

and T1 _(R3B)(x,y) and T2 _(R3B)(x,y) have the same sign

T 3 _(R3B)(x,y)=T 2 _(R3B)(x,y) where |T 2 _(R3B)(x,y)|<|T 1_(R3B)(x,y)|  (38)

and T2 _(R3B)(x,y) and T1 _(R3B)(x,y) have the same sign

T 3 _(R3B)(x,y)=0

where T2 _(R3B)(x,y) and T1 _(R3B)(x,y) have opposite signs

R′ _(3B)(x,y)=T 3 _(R3B)(x,y)W(x,y)  (39)

T 1 _(G3B)(x,y)=G _(3B)(x,y)−D′ _(3B)(x,y)G _(K3H)  (40)

T 2 _(G3B)(x,y)=G _(3B)(x,y)−D′ _(3B)(x,y)G _(K3L)  (41)

T 3 _(G3B)(x,y)=T 1 _(G3B)(x,y) where |T 1 _(G3B)(x,y)|≦|T 2_(G3B)(x,y)|

and T1 _(G3B)(x,y) and T2 _(G3B)(x,y) have the same sign

T 3 _(G3B)(x,y)=T 2 _(G3B)(x,y) where |T 2 _(G3B)(x,y)|<|T 1_(G3B)(x,y)|  (42)

and T2 _(G3B)(x,y) and T1 _(G3B)(x,y) have the same sign

T 3 _(G3B)(x,y)=0

where T2 _(G3B)(x,y) and T1 _(G3B)(x,y) have opposite signs

G′ _(3B)(x,y)=T 3 _(G3B)(x,y)W(x,y)  (43)

T 1 _(B3B)(x,y)=B _(3B)(x,y)−D′ _(3B)(x,y)B _(K3H)  (44)

T 2 _(B3B)(x,y)=B _(3B)(x,y)−D′ _(3B)(x,y)B _(K3L)  (45)

 T 3 _(B3B)(x,y)=T 1 _(B3B)(x,y) where |T 1 _(B3B)(x,y)|≦|T 2_(B3B)(x,y)|

and T1 _(B3B)(x,y) and T2 _(B3B)(x,y) have the same sign

T 3 _(B3B)(x,y)=T 2 _(B3B)(x,y) where |T 2 _(B3B)(x,y)|<|T 1_(B3B)(x,y)|  (46)

and T2 _(B3B)(x,y) and T1 _(B3B)(x,y) have the same sign

T 3 _(B3B)(x,y)=0

where T2 _(B3B)(x,y) and T1 _(B3B)(x,y) have opposite signs

B′ _(3B)(x,y)=T 3 _(B3B)(x,y)W(x,y)  (47)

T 1 _(R1B)(x,y)=R _(1B)(x,y)−D′ _(1B)(x,y)R _(K1H)  (48)

T 2 _(R1B)(x,y)=R _(1B)(x,y)−D′ _(1B)(x,y)R _(K1L)  (49)

T 3 _(R1B)(x,y)=T 1 _(R1B)(x,y) where |T 1 _(R1B)(x,y)|≦|T 2_(R1B)(x,y)|

and T1 _(R1B)(x,y) and T2 _(R1B)(x,y) have the same sign

T 3 _(R1B)(x,y)=T 2 _(R1B)(x,y) where |T 2 _(R1B)(x,y)|<|T 1_(G3B)(x,y)|  (50)

and T2 _(R1B)(x,y) and T1 _(R1B)(x,y) have the same sign

T 3 _(R1B)(x,y)=0

where T2 _(R1B)(x,y) and T1 _(R1B)(x,y) have opposite signs

R′ _(1B)(x,y)=T 3 _(R1B)(x,y)W(x,y)  (51)

T 1 _(G1B)(x,y)=G _(1B)(x,y)−D′ _(1B)(x,y)G _(K1H)  (52)

T 2 _(G1B)(x,y)=G _(1B)(x,y)−D′ _(1B)(x,y)G _(K1L)  (53)

 T 3 _(G1B)(x,y)=T 1 _(G1B)(x,y) where |T 1 _(G1B)(x,y)|≦|T 2_(G1B)(x,y)|

and T1 _(G1B)(x,y) and T2 _(G1B)(x,y) have the same sign

T 3 _(G1B)(x,y)=T 2 _(G1B)(x,y) where |T 2 _(G1B)(x,y)|<|T 1_(B3B)(x,y)|  (54)

and T2 _(G1B)(x,y) and T1 _(G1B)(x,y) have the same sign

T 3 _(G1B)(x,y)=0

where T2 _(G1B)(x,y) and T1 _(G1B)(x,y) have opposite signs

G′ _(1B) =T 3 _(G1B)(x,y)W(x,y)  (55)

T 1 _(B1B)(x,y)=B _(1B)(x,y)−D′ _(1B)(x,y)B _(K1H)  (56)

T 2 _(B1B)(x,y)=B _(1B)(x,y)−D′ _(1B)(x,y)B _(K1L)  (57)

T 3 _(B1B)(x,y)=T 1 _(B1B)(x,y) where |T 1 _(B1B)(x,y)|≦|T 2_(B1B)(x,y)|

and T1 _(B1B)(x,y) and T2 _(B1B)(x,y) have the same sign

T 3 _(B1B)(x,y)=T 2 _(B1B)(x,y) where |T 2 _(B1B)(x,y)|<|T 1_(B1B)(x,y)|  (58)

and T2 _(B1B)(x,y) and T1 _(B1B)(x,y) have the same sign

T 3 _(B1B)(x,y)=0

where T2 _(B1B)(x,y) and T1 _(B1B)(x,y) have opposite signs

B′ _(1B) =T 3 _(B1B)(x,y)W(x,y)  (59)

To obtain an enhanced image with the defect removed, the frequency bandsmay be recombined for each channel using Formulas 60 through 62.

R _(out)(x,y)=R′ _(1B)(x,y)+R′ _(3B)(x,y)+R′ _(8B)(x,y)  (60)

G _(out)(x,y)=G′ _(1B)(x,y)+G′ _(3B)(x,y)+G′ _(8B)(x,y)  (61)

 B _(out)(x,y)=B′ _(1B)(x,y)+B′ _(3B)(x,y)+B′ _(8B)(x,y)  (62)

These enhanced images may be converted back to the original image spaceusing an appropriate inverse logarithmic function. Again, all of theoptions discussed above in connection with step 67 are applicable tothis embodiment as well.

In step 78, it is determined whether there are any more segments of thedigital image to process. If so, then steps 74 and 76 are repeated foreach remaining segment of the digital image. If no more segments are tobe processed, then the method continues in step 80.

In step 80, it is determined if there are more overlaps to perform. Ifnot, then the procedure terminates in step 84. If so, then each channelof the enhanced digital image obtained by using steps 74 and 76 for eachsegment is divided into segments spatially different from the earliersegments. Steps 74 and 76 are then repeated for each of these segments.This aspect of this embodiment may compensate for results that may beobtained for pixels near the boundary of segments that were used whenthe image was first divided into segments in step 72. By performingdefect removal a second time, the defect may be further suppressed. Inthis example, a second overlap is performed using 8×8 segmentscomprising a 2×2 corner of four adjoining segments that touch oneanother at a common point. These 8×8 segments are thus made up ofone-fourth of each of four adjoining segments. Any of the optionsdescribed above with respect to step 72 may be used in step 82 inperforming division of the enhanced image into different segments.Different shapes can be used and different size segments can be usedwithout departing from the scope of the invention.

FIG. 7 illustrates a flow chart describing a method of altering defectsin a digital image using in-place correction in accordance with theinvention. In some implementations, defect correction may be performedfor a color digital image by using the three channels of the colordigital image and the defect channel to produce a three-channelcorrected output image. Because many forms of defect correction usesurrounding pixel values in determining a corrected pixel value, all ofthe original image information and the defect channel may be used toform the output image as a separate item in RAM 14 or disk drives 22 ofgeneral purpose computer 10 or on storage medium 38 of scanner 34. Inother words, the correction process may utilize storage sufficient tostore seven channels of information—the three channels of the inputdigital image, the defect channel, and the three channels of the outputdigital image. With a monochromatic image, the single channel of theinput digital image, the defect channel, and the single channel of theoutput digital image may be stored. Similar numbers of channels may bestored for other types of images such as satellite images or medicalimages.

In some scanners or image processing systems, the storage of an outputdigital image separate from the input digital image may be a significantfactor in the cost of the system, due to the amount of memory used. Inother systems, memory cost may not be a significant factor.

FIG. 7 illustrates a method for correcting the input digital image whichperforms correction in place without creating a separate output digitalimage. Instead, the channel or channels of the input digital image arecorrected in place. While the correction is in process, the channel orchannels of the input digital image will have some pixels that have beencorrected and other pixels that have not been corrected. The inventiontakes into account that correcting a pixel changes the informationprovided by that pixel and that such a change may affect correction ofadjacent pixels.

Although the invention described in FIG. 7 may be used in connectionwith the invention or inventions described in FIGS. 1-6, it may be usedwith other defect correction algorithms without departing from the scopeof the invention illustrated and described in connection with FIG. 7.

In step 90, a tangible image is scanned to create a digital image and adefect channel. As noted above, the image can be an image onphotographic film or any other type of tangible image such as aphotographic print or document. The image may be scanned in the case ofphotographic film, using a film scanner, or can be scanned in the caseof other tangible media using a flatbed or drum scanner. The inventionmay also be used with an existing digital image and defect channelrelated to the digital image that have been previously obtained withoutdeparting from the scope of the invention. Accordingly, step 90 isoptional.

In step 92, a pixel is chosen for correction. Some defect correctionalgorithms may apply the algorithm to each pixel in the image. In such acase, step 92 may simply choose the first pixel in the image during thefirst pass through the process described in FIG. 7. In other defectcorrection algorithms, a pixel may only have a defect correctionalgorithm applied if information from the defect channel indicates ahigh probability that the pixel is defective. In such an algorithm, thepixel chosen in step 92 may be the first pixel encountered in the imagesatisfying that criteria. Any method of choosing a pixel for correctionmay be used for step 92 without departing from the scope of theinvention.

In step 94, the relevant pixels used for the correction may be convertedto log space. As discussed above, conversion to log space may facilitatebetter calculation for various image defect correction algorithms.However, a conversion to log space need not be performed if not desired.In addition, all of the pixels in each channel of the digital image andthe defect channel may be converted to log space before the correctionprocess beings. Alternatively, only those pixels needed for a particularcorrection calculation may be converted to log space on an as-neededbasis. Either option can be used without departing from the scope of theinvention. One option for converting pixels of the image channel, orchannels, and defect channel to log space is Formula 1 described above.Other formulas for conversion to log space may be used without departingfrom the scope of the invention.

In step 96, the pixel is corrected in all channels of the digital imageusing some type of correction algorithm such as, for example, thecorrection algorithms described above. Then, in step 98, the defectpixel spatially corresponding to the corrected pixel is set to a valueindicating that the corrected pixel is now reliable. For example, theintensity value of the defect pixel may be set to a predetermined valuecomprising a threshold over which the correction algorithm used in step96 determines that the pixel is reliable. In film scanners, the defectchannel may be adjusted to take into account clear film levels and redleakage as described above. If no defect is present, then the intensityof the defect channel should comprise a level corresponding to the levelthat would result if the light source used to create the defect channelwas sent through clear film of the type being scanned plus the redleakage. Thus, the defect channel can be adjusted to reflect the clearfilm level, the red leakage, or both for a particular pixel. Such adefect level will indicate to the defect correction algorithm applied instep 96 that the corrected pixel is reliable in subsequent calculationsinvolving the pixel in question. Formula 63 provides one example of aformula that may be used to calculate a new defect value taking intoaccount both clear film and red leakage.

D′(x,y)=C _(F) +R(x,y)R _(L)  (63)

In Formula 63, C_(F) is the clear film intensity value, R_(L) comprisesa red leakage measurement while R comprises the intensity of the pixelin question in the red channel. Other formulas may be used withoutdeparting from the scope of the invention.

During the correction of pixels adjacent to a pixel that has beencorrected in this manner, the defect correction algorithm will interpretthe corrected pixel as reliable. If step 98 were omitted and the defectchannel not altered after alteration of the corresponding pixels in thechannels of the digital image, then the correction algorithm mighterroneously conclude that an already corrected pixel was defective, and,as a result, potentially degrade the performance of the correctionalgorithm. The invention allows in-place correction without thisdifficulty.

In step 100, it is determined whether there are any more pixelsremaining in the image that may be corrected. If so, then the procedurereturns to step 92. If not, then the procedure continues to step 102. Instep 102, the pixels of the image and defect channel are converted backto image space from log space if they were converted to log space instep 94. The procedure then terminates in step 104. If a correctionalgorithm is chosen where only those pixels involved in a particularcorrection calculation are converted to log space as needed, then thecorrected pixel and corrected defect pixel should be converted back toimage space after step 98 and before step 100.

Although the inventions described herein involve calculations in thespatial domain, analogous calculations in the frequency domain couldequivalently be used without departing from the scope of the invention.

Although the present invention has been described in detail, it shouldbe understood that various changes, substitutions and alterations can bemade hereto without departing from the sphere and scope of the inventionas defined by the appended claims.

To aid the Patent Office, and any readers of any patent issued on thisapplication in interpreting the claims appended hereto, applicants wishto note that they do not intend any of the appended claims to invoke ¶ 6of 35 U.S.C. §112 as it exists on the date of filing hereof unless“means for” or “step for” are used in the particular claim.

What is claimed is:
 1. A method for correcting a digital imagerepresentative of a tangible image, comprising: calculating usingelectronic circuitry a first corrected intensity value for a first pixelof a first channel of the digital image in response to the intensity ofa first defect pixel in a defect channel associated with the digitalimage, the first pixel having a first original intensity value;replacing the first original intensity value with the first correctedintensity value; replacing the intensity of the first defect pixel withan intensity value signifying that the first pixel is reliable; andcalculating using electronic circuitry a second corrected intensityvalue for a second pixel of the first channel of the digital image inresponse to the intensity of the first pixel after replacement and theintensity of the first defect pixel after replacement.
 2. The method ofclaim 1, wherein the intensity value signifying that the first pixel isreliable is responsive to a clear film intensity value, the clear filmintensity value comprising the intensity of a pixel of the defectchannel that results when light from a light source used to create thedefect channel is passed through clear film of the type on which thetangible image is stored.
 3. The method of claim 1, wherein theintensity value signifying that the first pixel is reliable comprises apredetermined value.
 4. The method of claim 1, wherein the digital imagecomprises a red channel, a blue channel, and a green channel; andwherein the intensity value signifying that the first pixel is reliableis responsive to a red leakage value, the red leakage value comprising ameasure of the amount of information from the red channel present in thedefect channel.
 5. The method of claim 4, wherein the intensity valuesignifying that the first pixel is reliable is further responsive to aclear film intensity value, the clear film intensity value comprisingthe intensity of a pixel of the defect channel that results when lightfrom a light source used to create the defect channel is passed throughclear film of the type on which the tangible image is stored.
 6. Themethod of claim 1, wherein the digital image comprises a red channel, ablue channel, and a green channel.
 7. The method of claim 6, furthercomprising: calculating using electronic circuitry a third correctedintensity value for a first pixel of the red channel of the digitalimage in response to the intensity of the first defect pixel, the firstpixel of the red channel having a third original intensity value;calculating using electronic circuitry a fourth corrected intensityvalue for a first pixel of the green channel of the digital image inresponse to the intensity of a first defect pixel, the first pixel ofthe green channel having a fourth original intensity value; replacingthe third original intensity value with the third corrected intensityvalue; replacing the fourth original intensity value with the fourthcorrected intensity value; wherein the first channel comprises the bluechannel of the digital image; and wherein the replacement of the thirdoriginal intensity value, fourth original intensity value, and firstoriginal intensity value occur before the replacement of the intensityof the first defect pixel.
 8. The method of claim 7, wherein theintensity value signifying that the first pixel is reliable isresponsive to a red leakage value, the red leakage value comprising ameasure of the amount of information from the red channel present in thedefect channel.
 9. The method of claim 8, wherein the intensity valuesignifying that the first pixel is reliable is further responsive to aclear film intensity value, the clear film intensity value comprisingthe intensity of a pixel of the defect channel that results when lightfrom a light source used to create the defect channel is passed throughclear film of the type on which the tangible image is stored.
 10. Adigital image scanning system, comprising: scanning hardware operable toscan an image and convert the image into a digital image having at leastone channel and to produce a defect channel responsive to defects in theimage; and computer software associated with the scanning hardware andoperable to calculate using electronic circuitry a first correctedintensity value for a first pixel of a first channel of the digitalimage in response to the intensity of a first defect pixel in a defectchannel associated with the digital image, the first pixel having afirst original intensity value, replace the first original intensityvalue with the first corrected intensity value, replace the intensity ofthe first defect pixel with an intensity value signifying that the firstpixel is reliable, calculate using electronic circuitry a secondcorrected intensity value for a second pixel of the first channel of thedigital image in response to the intensity of the first pixel afterreplacement and the intensity of the first defect pixel afterreplacement.
 11. The digital image scanning system of claim 10, whereinthe intensity value signifying that the first pixel is reliable isresponsive to a clear film intensity value, the clear film intensityvalue comprising the intensity of a pixel of the defect channel thatresults when light from a light source used to create the defect channelis passed through clear film of the type on which the tangible image isstored.
 12. The digital image scanning system of claim 10, wherein theintensity value signifying that the first pixel is reliable comprises apredetermined value.
 13. The digital image scanning system of claim 10,wherein the digital image comprises a red channel, a blue channel, and agreen channel; and wherein the intensity value signifying that the firstpixel is reliable is responsive to a red leakage value, the red leakagevalue comprising a measure of the amount of information from the redchannel present in the defect channel.
 14. The digital image scanningsystem of claim 13, wherein the intensity value signifying that thefirst pixel is reliable is further responsive to a clear film intensityvalue, the clear film intensity value comprising the intensity of apixel of the defect channel that results when light from a light sourceused to create the defect channel is passed through clear film of thetype on which the tangible image is stored.
 15. The digital imagescanning system of claim 10, wherein the digital image comprises a redchannel, a blue channel, and a green channel.
 16. The digital imagescanning system of claim 15, wherein the computer software is furtheroperable to: calculate using electronic circuitry a third correctedintensity value for a first pixel of the red channel of the digitalimage in response to the intensity of the first defect pixel, the firstpixel of the red channel having a third original intensity value;calculate using electronic circuitry a fourth corrected intensity valuefor a first pixel of the green channel of the digital image in responseto the intensity of a first defect pixel, the first pixel of the greenchannel having a fourth original intensity value; replace the thirdoriginal intensity value with the third corrected intensity value;replace the fourth original intensity value with the fourth correctedintensity value; wherein the first channel comprises the blue channel ofthe digital image; and wherein the replacement of the third originalintensity value, fourth original intensity value, and first originalintensity value occur before the replacement of the intensity of thefirst defect pixel.
 17. A digital image processing system, comprising: acomputer readable storage medium; computer software stored on thecomputer readable storage medium and operable to calculate usingelectronic circuitry a first corrected intensity value for a first pixelof a first channel of the digital image in response to the intensity ofa first defect pixel in a defect channel associated with the digitalimage, the first pixel having a first original intensity value, replacethe first original intensity value with the first corrected intensityvalue, replace the intensity of the first defect pixel with an intensityvalue signifying that the first pixel is reliable, calculate usingelectronic circuitry a second corrected intensity value for a secondpixel of the first channel of the digital image in response to theintensity of the first pixel after replacement and the intensity of thefirst defect pixel after replacement.
 18. The digital image processingsystem of claim 17, wherein the intensity value signifying that thefirst pixel is reliable is responsive to a clear film intensity value,the clear film intensity value comprising the intensity of a pixel ofthe defect channel that results when light from a light source used tocreate the defect channel is passed through clear film of the type onwhich the tangible image is stored.
 19. The digital image processingsystem of claim 17, wherein the intensity value signifying that thefirst pixel is reliable comprises a predetermined value.
 20. The digitalimage processing system of claim 17, wherein the digital image comprisesa red channel, a blue channel, and a green channel; and wherein theintensity value signifying that the first pixel is reliable isresponsive to a red leakage value, the red leakage value comprising ameasure of the amount of information from the red channel present in thedefect channel.
 21. The digital image processing system of claim 20,wherein the intensity value signifying that the first pixel is reliableis further responsive to a clear film intensity value, the clear filmintensity value comprising the intensity of a pixel of the defectchannel that results when light from a light source used to create thedefect channel is passed through clear film of the type on which thetangible image is stored.
 22. The digital image processing system ofclaim 17, wherein the digital image comprises a red channel, a bluechannel, and a green channel.
 23. The digital image processing system ofclaim 22, wherein the computer software is further operable to:calculate using electronic circuitry a third corrected intensity valuefor a first pixel of the red channel of the digital image in response tothe intensity of the first defect pixel, the first pixel of the redchannel having a third original intensity value; calculate usingelectronic circuitry a fourth corrected intensity value for a firstpixel of the green channel of the digital image in response to theintensity of a first defect pixel, the first pixel of the green channelhaving a fourth original intensity value; replace the third originalintensity value with the third corrected intensity value; replace thefourth original intensity value with the fourth corrected intensityvalue; wherein the first channel comprises the blue channel of thedigital image; and wherein the replacement of the third originalintensity value, fourth original intensity value, and first originalintensity value occur before the replacement of the intensity of thefirst defect pixel.
 24. The digital image processing system of claim 23,wherein the intensity value signifying that the first pixel is reliableis responsive to a red leakage value, the red leakage value comprising ameasure of the amount of information from the red channel present in thedefect channel.
 25. The digital image processing system of claim 24,wherein the intensity value signifying that the first pixel is reliableis further responsive to a clear film intensity value, the clear filmintensity value comprising the intensity of a pixel of the defectchannel that results when light from a light source used to create thedefect channel is passed through clear film of the type on which thetangible image is stored.
 26. An altered digital image derived from adigital image having at least one channel, comprising: a computerreadable storage medium; an altered digital image stored on the computerreadable storage medium wherein the altered digital image was created bycalculating using electronic circuitry a first corrected intensity valuefor a first pixel of a first channel of the digital image in response tothe intensity of a first defect pixel in a defect channel associatedwith the digital image, the first pixel having a first originalintensity value; replacing the first original intensity value with thefirst corrected intensity value; replacing the intensity of the firstdefect pixel with an intensity value signifying that the first pixel isreliable; and calculating using electronic circuitry a second correctedintensity value for a second pixel of the first channel of the digitalimage in response to the intensity of the first pixel after replacementand the intensity of the first defect pixel after replacement.